package com.bjut.vendormgrsys.model.domain;

import com.bjut.vendormgrsys.model.domain.id.UserRoleId;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 角色用户关系表
 */
@Data
@Entity
@IdClass(UserRoleId.class)
@Table(name = "user_role")
public class UserRolePO implements Serializable {
    /**
     * 用户主键ID
     */
    @Id
    @Column(name = "user_id", length = 32, nullable = false)
    private String uid;
    /**
     * 角色主键ID
     */
    @Id
    @Column(name = "role_id", length = 32, nullable = false)
    private String rid;

}
